package com.dg.cuckoo.admin.action.integratedQuery;

import com.dg.cuckoo.admin.service.ProjectMoneyService;
import com.dg.cuckoo.admin.vo.ProjectMoneyVo;
import com.dg.cuckoo.core.BaseController;
import com.dg.cuckoo.core.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 综合查询-项目资金查询
 */
@RestController
@RequestMapping("/integratedQuery/projectMoney")
public class ProjectMoney extends BaseController {

    @Autowired
    private ProjectMoneyService service;

    /**
     * 查询
     *
     * @return
     */
    @PostMapping("query")
    public JsonResult<List<ProjectMoneyVo>> query(@RequestParam(value = "oneLabel", required = false) List<String> oneLabel, @RequestParam(value = "twoLabel", required = false) List<String> twoLabel, String unit, String year, String mainName) {
        List<ProjectMoneyVo> data = service.query(oneLabel, twoLabel, unit, year, mainName);
        return new JsonResult<>(OK, data);
    }

}
